package yb.ecp.fast;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import yb.ecp.fast.annotation.EnableGenServiceClient;
import yb.ecp.fast.infra.annotation.EnableFastAccessGrant;

@SpringBootApplication(scanBasePackages = {"yb.ecp.fast", "com.devi.cache"})
@EnableDiscoveryClient
@EnableFeignClients
@EnableFastAccessGrant
@EnableGenServiceClient
public class AuthServerApplication {

    public static void main(String[] args) {

        SpringApplication.run(AuthServerApplication.class, args);
    }

//    @Bean
//    public CommandLineRunner dataInitial(JdbcTemplate jdbcTemplate, DataInitConfig dataInitConfig) {
//        if (dataInitConfig.isInitFlag()) {
//            String[] ddlScript = ScriptLoader.load(dataInitConfig.getDdlPath());
//            String[] dataScript = ScriptLoader.load(dataInitConfig.getDataPath());
//            // 启动完成时执行脚本
//            return new DataRunner(jdbcTemplate, ddlScript, dataScript);
//        } else {
//            LogHelper.monitor("you can set \"fast.auth.initFlag=true\" to init auth data");
//            return null;
//        }
//
//    }
}
